﻿// Decompiled with JetBrains decompiler
// Type: UnityEngine.CombineInstance
// Assembly: UnityEngine.CoreModule, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null
// MVID: E6AE6B5A-2752-4B07-9528-C8B77C62CE79
// Assembly location: C:\Users\windys\Unity\2021.3.39f1c1\Editor\Data\Managed\UnityEngine\UnityEngine.CoreModule.dll
// XML documentation location: C:\Users\windys\Unity\2021.3.39f1c1\Editor\Data\Managed\UnityEngine\UnityEngine.CoreModule.xml

#nullable disable
namespace UnityEngine
{
  /// <summary>
  ///   <para>Struct used to describe meshes to be combined using Mesh.CombineMeshes.</para>
  /// </summary>
  public struct CombineInstance
  {
    private int m_MeshInstanceID;
    private int m_SubMeshIndex;
    private Matrix4x4 m_Transform;
    private Vector4 m_LightmapScaleOffset;
    private Vector4 m_RealtimeLightmapScaleOffset;

    /// <summary>
    ///   <para>Mesh to combine.</para>
    /// </summary>
    public Mesh mesh
    {
      get => Mesh.FromInstanceID(this.m_MeshInstanceID);
      set => this.m_MeshInstanceID = (Object) value != (Object) null ? value.GetInstanceID() : 0;
    }

    /// <summary>
    ///   <para>Sub-Mesh index of the Mesh.</para>
    /// </summary>
    public int subMeshIndex
    {
      get => this.m_SubMeshIndex;
      set => this.m_SubMeshIndex = value;
    }

    /// <summary>
    ///   <para>Matrix to transform the Mesh with before combining. Refer to Mesh.CombineMeshes for an example.</para>
    /// </summary>
    public Matrix4x4 transform
    {
      get => this.m_Transform;
      set => this.m_Transform = value;
    }

    /// <summary>
    ///   <para>The baked lightmap UV scale and offset applied to the Mesh.</para>
    /// </summary>
    public Vector4 lightmapScaleOffset
    {
      get => this.m_LightmapScaleOffset;
      set => this.m_LightmapScaleOffset = value;
    }

    /// <summary>
    ///   <para>The real-time lightmap UV scale and offset applied to the Mesh.</para>
    /// </summary>
    public Vector4 realtimeLightmapScaleOffset
    {
      get => this.m_RealtimeLightmapScaleOffset;
      set => this.m_RealtimeLightmapScaleOffset = value;
    }
  }
}
